From: Jim Blandy Date: Thu, 18 Mar 1993 23:06:04 +0000 (+0000) Subject: * make-dist: Use gzip, if we can find it. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~96807 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=e25731656094308acae398f74d43c14f7b5e7218;p=emacs.git * make-dist: Use gzip, if we can find it. --- diff --git a/make-dist b/make-dist index 41631f2f5e6..e7a00cd9a5f 100755 --- a/make-dist +++ b/make-dist @@ -253,8 +253,22 @@ if [ "${newer}" ]; then fi if [ "${make_tar}" = yes ]; then + echo "Looking for gzip." + temppath=`echo $PATH | sed 's/^:/.:/ + s/::/:.:/g + s/:$/:./ + s/:/ /g'` + default_compress=`( + for dir in ${temppath}; do + if [ -f ${dir}/gzip ]; then echo 'gzip --best'; exit 0; fi + done + echo compress + )` echo "Creating tar file." - (cd ${tempparent}; tar cvf - ${emacsname}) | compress > ${emacsname}.tar.Z + (cd ${tempparent} + tar cvf - ${emacsname}) \ + | ${default_compress} > ${emacsname}.tar.Z + ) fi if [ "${clean_up}" = yes ]; then